package com.bing.spring;

import com.bing.bean.TestBean;
import org.springframework.beans.factory.FactoryBean;

/**
 * Created by kaibb on 15-9-5.
 */
public class TestFatoryBean implements FactoryBean<TestBean>{
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public TestBean getObject() throws Exception {
        TestBean testBean=new TestBean();
        testBean.setName(name);
        return testBean;
    }

    @Override
    public Class<?> getObjectType() {
        return TestBean.class;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
